<?php
define("APP_PATH",dirname(__FILE__));
define("SP_PATH",dirname(__FILE__).'/SpeedPHP');
require(APP_PATH.'/config/config.enviroment.php');
require(APP_PATH.'/config/config.consts.php');
$spConfig = array(
	"db" => array( //database config
		'host' => DB_HOST_NAME,
		'login' => DB_USER_NAME,
		'password' => DB_USER_PASSWORD,
		'database' => DB_DATABASE_NAME,
		'prefix' => DB_DATABASE_TABLE_PREFIX,
	),
	'view' => array(
		'enabled' => TRUE, // enable template feature
		'config' =>array(
			'template_dir' => APP_PATH.'/tpl', // template file directory
			'compile_dir' => APP_PATH.'/tmp', // compile directory
			'cache_dir' => APP_PATH.'/tmp', // cache template
			'left_delimiter' => '<{',  // smarty start character
			'right_delimiter' => '}>', // smarty end character
		),
		'auto_display' => TRUE, // auto template output
		'auto_display_sep' => "_", // template compose mode，/ split by directory，_ split by _
	),
	
	'launch' => array( 
		 'router_prefilter' => array( 
			array('spAcl','maxcheck') // max privilege check
		 )
	 ),
	 'ext' => array( // extension settings
	 	'spAcl' => array( // acl	 
	 		// If don't granted privilege call function 
	 		'prompt' => array("model_user", "acljump"),
	 	), 
	 ),
	 'global_admin_acl'=>'GBADMIN',
	 'mode' => SITE_RUNNING_MODE
);

require(SP_PATH."/SpeedPHP.php");
import(APP_PATH.'/controller/baseController.php');
import(APP_PATH.'/model/model_version.php');
import('class.sessionutil.php');
import('class.util.php');
spRun();